import { defineStore } from 'pinia'
import axios from 'axios'


const usePersonList = defineStore('personList',{
    state() { 
    return {
        list: []
    }
    },
    actions:{
        async loadData(){
            let p = await axios.get('http://127.0.0.1/addressbook')
                // console.log(p.data);
            this.list=p.data.data

        }
    }
})

export default usePersonList